package com.qf.wangqing.sportsnews.bean;

import android.content.Intent;
import android.util.Log;
import android.view.View;

import com.qf.wangqing.sportsnews.R;
import com.qf.wangqing.sportsnews.activity.TitleType2Activity;
import com.qf.wangqing.sportsnews.activity.TitleType4Activity;

/**
 * 新闻 推荐里 第一个view pager
 * Created by WangQing on 2016/12/15.
 */

public class RecommendBannersEntity {
    private int id;

    private int channel_id;

    private String channel_name;

    private String image;

    private String text;

    private String title;

    private int type;

    private String link;

    private int sort;

    private String create_time;

    private String editor;

    private boolean video_flag;

    private boolean delete_flag;

    public boolean isDelete_flag() {
        return delete_flag;
    }

    public void setDelete_flag(boolean delete_flag) {
        this.delete_flag = delete_flag;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getChannel_id() {
        return channel_id;
    }

    public void setChannel_id(int channel_id) {
        this.channel_id = channel_id;
    }

    public String getChannel_name() {
        return channel_name;
    }

    public void setChannel_name(String channel_name) {
        this.channel_name = channel_name;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getLink() {
        return link;
    }

    public void setLink(String link) {
        this.link = link;
    }

    public int getSort() {
        return sort;
    }

    public void setSort(int sort) {
        this.sort = sort;
    }

    public String getCreate_time() {
        return create_time;
    }

    public void setCreate_time(String create_time) {
        this.create_time = create_time;
    }

    public String getEditor() {
        return editor;
    }

    public void setEditor(String editor) {
        this.editor = editor;
    }

    public boolean isVideo_flag() {
        return video_flag;
    }

    public void setVideo_flag(boolean video_flag) {
        this.video_flag = video_flag;
    }
    //获取完整的图片url的方法
    public String getFullImageUrl(){
        return "http://lifeixphoto.qiniudn.com/"+image;
    }
    //头布局跳转
        public void clickImage(View view){
            Log.i("type","type"+type);
        Intent intent = new Intent();
            if (type == 2) {
                intent.setClass(view.getContext(), TitleType2Activity.class);
                intent.putExtra("link",link);
            }else if(type == 4){
                intent.setClass(view.getContext(), TitleType4Activity.class);
                intent.putExtra("link",link);
            }
            view.getContext().startActivity(intent);
//            overridePendingTransition(R.anim.right, R.anim.left);
    }
}
